<!DOCTYPE html>
<head xmlns:v-bind="http://www.w3.org/1999/xhtml" >
    <meta charset="UTF-8">
    <title>demo17_2-vue混入,优先级</title>
  <script src="./js/vue.min.js"></script>
  <script src="./js/vue-router.js"></script>
</head>

<body>


</body>

<script type="application/javascript">


 const myMixin = {
   methods: {
     helloworld: function () {
       document.write('helloworld 方法<br>')
     },
     samemethod: function () {
       document.write('mixin相同方法<br>')
     }
   }
 };

 let vm = new Vue({
   mixins: [myMixin],
   methods: {
     start: function () {
       document.write('start 方法 <br>')
     },
     samemethod: function () {
       document.write('main相同方法名')
     }
   }
 });
 vm.helloworld();
 vm.start();
 vm.samemethod();

</script>
</html>
